package com.xquant.system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 内码融合表
 * @TableName TWC_BND_PRIMARY_KEY_TEST
 */
@TableName(value ="TWC_BND_PRIMARY_KEY_TEST")
@Data
public class TwcBndPrimaryKeyTest implements Serializable {
    /**
     * 主键
     */
    @TableId
    private Long ID;

    /**
     * 来源内部编码
     */
    private String SOURCE_CODE;

    /**
     * 来源合并内码
     */
    private String SOURCE_D_CODE;

    /**
     * 主数据唯一内部编码
     */
    private String SEC_CODE;

    /**
     * 财汇、聚源、衡泰规则：当相同来源，且本表SOURCE_D_CODE一致的时候，附相同合并内码，合并内码的生成规则同SEC_CODE
万得：RalatedSecuritiesCode表S_INFO_RALATEDCODE=115002001时候，认定为是一只债券，附上一个虚拟的D_CODE
     */
    private String d_CODE;

    /**
     * 交易市场
     */
    private String m_TYPE;

    /**
     * 交易代码
     */
    private String i_CODE;

    /**
     * 债券简称
     */
    private String NAME;

    /**
     * 债券全称
     */
    private String NAME_FULL;

    /**
     * 到期日
     */
    private String b_EARLY_MTR_DATE;

    /**
     * 取消发行
     */
    private String CANCEL;

    /**
     * 代码状态  当前代码状态。 判断规则：当本表的I_CODE字段数据包含字母的话，为‘临时代码’、 当本表的I_CODE字段数据不包含字母的话，为‘正式代码’
     */
    private String CODE_STATUS;

    /**
     * 合并状态   0 未合并  1 已合并      当前合并状态。 判断规则：当本表的SEC_CODE为空，为‘未合并’、 当本表的SEC_CODE不为空，为‘已合并’
     */
    private String MERGE_STATUS;

    /**
     * 数据来源，1:HT， 2:CH， 3:WD
     */
    private Long DATA_SOURCE;

    /**
     * 合并类型，0:程序合并 1:人工合并
     */
    private String MERGE_TYPE;

    /**
     * 备注
     */
    private String REMARK;

    /**
     * 操作创建人
     */
    private String CREATED_BY;

    /**
     * 操作创建时间
     */
    private Date CREATED_TIME;

    /**
     * 操作更新人
     */
    private String UPDATED_BY;

    /**
     * 操作更新时间
     */
    private Date UPDATED_TIME;

    /**
     * 原始数据更新时间
     */
    private String UPDATE_TIME;

    /**
     * 原始数据更新日期
     */
    private String UPDATE_DATE;

    /**
     * 导入管道
     */
    private Long PIPE_ID;

    /**
     * 导入日期
     */
    private String IMP_DATE;

    /**
     * 导入时间
     */
    private String IMP_TIME;

    /**
     * 状态  0 删除   1正常
     */
    private String ISEXIST;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TwcBndPrimaryKeyTest other = (TwcBndPrimaryKeyTest) that;
        return (this.getID() == null ? other.getID() == null : this.getID().equals(other.getID()))
            && (this.getSOURCE_CODE() == null ? other.getSOURCE_CODE() == null : this.getSOURCE_CODE().equals(other.getSOURCE_CODE()))
            && (this.getSOURCE_D_CODE() == null ? other.getSOURCE_D_CODE() == null : this.getSOURCE_D_CODE().equals(other.getSOURCE_D_CODE()))
            && (this.getSEC_CODE() == null ? other.getSEC_CODE() == null : this.getSEC_CODE().equals(other.getSEC_CODE()))
            && (this.getD_CODE() == null ? other.getD_CODE() == null : this.getD_CODE().equals(other.getD_CODE()))
            && (this.getM_TYPE() == null ? other.getM_TYPE() == null : this.getM_TYPE().equals(other.getM_TYPE()))
            && (this.getI_CODE() == null ? other.getI_CODE() == null : this.getI_CODE().equals(other.getI_CODE()))
            && (this.getNAME() == null ? other.getNAME() == null : this.getNAME().equals(other.getNAME()))
            && (this.getNAME_FULL() == null ? other.getNAME_FULL() == null : this.getNAME_FULL().equals(other.getNAME_FULL()))
            && (this.getB_EARLY_MTR_DATE() == null ? other.getB_EARLY_MTR_DATE() == null : this.getB_EARLY_MTR_DATE().equals(other.getB_EARLY_MTR_DATE()))
            && (this.getCANCEL() == null ? other.getCANCEL() == null : this.getCANCEL().equals(other.getCANCEL()))
            && (this.getCODE_STATUS() == null ? other.getCODE_STATUS() == null : this.getCODE_STATUS().equals(other.getCODE_STATUS()))
            && (this.getMERGE_STATUS() == null ? other.getMERGE_STATUS() == null : this.getMERGE_STATUS().equals(other.getMERGE_STATUS()))
            && (this.getDATA_SOURCE() == null ? other.getDATA_SOURCE() == null : this.getDATA_SOURCE().equals(other.getDATA_SOURCE()))
            && (this.getMERGE_TYPE() == null ? other.getMERGE_TYPE() == null : this.getMERGE_TYPE().equals(other.getMERGE_TYPE()))
            && (this.getREMARK() == null ? other.getREMARK() == null : this.getREMARK().equals(other.getREMARK()))
            && (this.getCREATED_BY() == null ? other.getCREATED_BY() == null : this.getCREATED_BY().equals(other.getCREATED_BY()))
            && (this.getCREATED_TIME() == null ? other.getCREATED_TIME() == null : this.getCREATED_TIME().equals(other.getCREATED_TIME()))
            && (this.getUPDATED_BY() == null ? other.getUPDATED_BY() == null : this.getUPDATED_BY().equals(other.getUPDATED_BY()))
            && (this.getUPDATED_TIME() == null ? other.getUPDATED_TIME() == null : this.getUPDATED_TIME().equals(other.getUPDATED_TIME()))
            && (this.getUPDATE_TIME() == null ? other.getUPDATE_TIME() == null : this.getUPDATE_TIME().equals(other.getUPDATE_TIME()))
            && (this.getUPDATE_DATE() == null ? other.getUPDATE_DATE() == null : this.getUPDATE_DATE().equals(other.getUPDATE_DATE()))
            && (this.getPIPE_ID() == null ? other.getPIPE_ID() == null : this.getPIPE_ID().equals(other.getPIPE_ID()))
            && (this.getIMP_DATE() == null ? other.getIMP_DATE() == null : this.getIMP_DATE().equals(other.getIMP_DATE()))
            && (this.getIMP_TIME() == null ? other.getIMP_TIME() == null : this.getIMP_TIME().equals(other.getIMP_TIME()))
            && (this.getISEXIST() == null ? other.getISEXIST() == null : this.getISEXIST().equals(other.getISEXIST()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getID() == null) ? 0 : getID().hashCode());
        result = prime * result + ((getSOURCE_CODE() == null) ? 0 : getSOURCE_CODE().hashCode());
        result = prime * result + ((getSOURCE_D_CODE() == null) ? 0 : getSOURCE_D_CODE().hashCode());
        result = prime * result + ((getSEC_CODE() == null) ? 0 : getSEC_CODE().hashCode());
        result = prime * result + ((getD_CODE() == null) ? 0 : getD_CODE().hashCode());
        result = prime * result + ((getM_TYPE() == null) ? 0 : getM_TYPE().hashCode());
        result = prime * result + ((getI_CODE() == null) ? 0 : getI_CODE().hashCode());
        result = prime * result + ((getNAME() == null) ? 0 : getNAME().hashCode());
        result = prime * result + ((getNAME_FULL() == null) ? 0 : getNAME_FULL().hashCode());
        result = prime * result + ((getB_EARLY_MTR_DATE() == null) ? 0 : getB_EARLY_MTR_DATE().hashCode());
        result = prime * result + ((getCANCEL() == null) ? 0 : getCANCEL().hashCode());
        result = prime * result + ((getCODE_STATUS() == null) ? 0 : getCODE_STATUS().hashCode());
        result = prime * result + ((getMERGE_STATUS() == null) ? 0 : getMERGE_STATUS().hashCode());
        result = prime * result + ((getDATA_SOURCE() == null) ? 0 : getDATA_SOURCE().hashCode());
        result = prime * result + ((getMERGE_TYPE() == null) ? 0 : getMERGE_TYPE().hashCode());
        result = prime * result + ((getREMARK() == null) ? 0 : getREMARK().hashCode());
        result = prime * result + ((getCREATED_BY() == null) ? 0 : getCREATED_BY().hashCode());
        result = prime * result + ((getCREATED_TIME() == null) ? 0 : getCREATED_TIME().hashCode());
        result = prime * result + ((getUPDATED_BY() == null) ? 0 : getUPDATED_BY().hashCode());
        result = prime * result + ((getUPDATED_TIME() == null) ? 0 : getUPDATED_TIME().hashCode());
        result = prime * result + ((getUPDATE_TIME() == null) ? 0 : getUPDATE_TIME().hashCode());
        result = prime * result + ((getUPDATE_DATE() == null) ? 0 : getUPDATE_DATE().hashCode());
        result = prime * result + ((getPIPE_ID() == null) ? 0 : getPIPE_ID().hashCode());
        result = prime * result + ((getIMP_DATE() == null) ? 0 : getIMP_DATE().hashCode());
        result = prime * result + ((getIMP_TIME() == null) ? 0 : getIMP_TIME().hashCode());
        result = prime * result + ((getISEXIST() == null) ? 0 : getISEXIST().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ID=").append(ID);
        sb.append(", SOURCE_CODE=").append(SOURCE_CODE);
        sb.append(", SOURCE_D_CODE=").append(SOURCE_D_CODE);
        sb.append(", SEC_CODE=").append(SEC_CODE);
        sb.append(", d_CODE=").append(d_CODE);
        sb.append(", m_TYPE=").append(m_TYPE);
        sb.append(", i_CODE=").append(i_CODE);
        sb.append(", NAME=").append(NAME);
        sb.append(", NAME_FULL=").append(NAME_FULL);
        sb.append(", b_EARLY_MTR_DATE=").append(b_EARLY_MTR_DATE);
        sb.append(", CANCEL=").append(CANCEL);
        sb.append(", CODE_STATUS=").append(CODE_STATUS);
        sb.append(", MERGE_STATUS=").append(MERGE_STATUS);
        sb.append(", DATA_SOURCE=").append(DATA_SOURCE);
        sb.append(", MERGE_TYPE=").append(MERGE_TYPE);
        sb.append(", REMARK=").append(REMARK);
        sb.append(", CREATED_BY=").append(CREATED_BY);
        sb.append(", CREATED_TIME=").append(CREATED_TIME);
        sb.append(", UPDATED_BY=").append(UPDATED_BY);
        sb.append(", UPDATED_TIME=").append(UPDATED_TIME);
        sb.append(", UPDATE_TIME=").append(UPDATE_TIME);
        sb.append(", UPDATE_DATE=").append(UPDATE_DATE);
        sb.append(", PIPE_ID=").append(PIPE_ID);
        sb.append(", IMP_DATE=").append(IMP_DATE);
        sb.append(", IMP_TIME=").append(IMP_TIME);
        sb.append(", ISEXIST=").append(ISEXIST);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}